home *** CD-ROM | disk | FTP | other *** search
-
-
-
- CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((3333ddddmmmm)))) CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((3333ddddmmmm))))
-
-
-
- NNNNAAAAMMMMEEEE
- CDaddcallback - set a callback for the CD audio data parser
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ccccddddaaaauuuuddddiiiioooo....hhhh>>>>
-
- vvvvooooiiiidddd CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((CCCCDDDDPPPPAAAARRRRSSSSEEEERRRR**** ccccddddpppp,,,, CCCCDDDDDDDDAAAATTTTAAAATTTTYYYYPPPPEEEESSSS ttttyyyyppppeeee,,,,
- CCCCDDDDCCCCAAAALLLLLLLLBBBBAAAACCCCKKKKFFFFUUUUNNNNCCCC ffffuuuunnnncccc,,,, vvvvooooiiiidddd**** aaaarrrrgggg))))
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- _c_d_p A pointer to the target CCCCDDDDPPPPAAAARRRRSSSSEEEERRRR....
-
- _t_y_p_e The type of callback being set. CDDATATYPES is an enumerated type
- defined in _c_d_a_u_d_i_o._h containing the following values: _c_d__a_u_d_i_o,
- _c_d__p_n_u_m, _c_d__i_n_d_e_x, _c_d__p_t_i_m_e, _c_d__a_t_i_m_e, _c_d__c_a_t_a_l_o_g, _c_d__i_d_e_n_t,
- _c_d__c_o_n_t_r_o_l.
-
- _f_u_n_c A pointer to the function to be called.
-
- _a_r_g A user supplied argument that is passed to the callback function.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((3333ddddmmmm)))) adds a callback for the specified parser. The parser
- has callbacks for eight different types of data in the digital audio data
- stream corresponding to the enumerated types listed above. When data of
- a particular type changes in the data stream from the disc, the parser
- invokes the corresponding callback passing it a pointer to the data. The
- _c_d__a_u_d_i_o callback is an exception to this. It is called for every
- recorded frame regardless of whether the data changed.
-
- The callback is called as follows
-
- func(void* arg, CDDATATYPES type, void* data);
-
-
- _a_r_g is the user supplied argument provided as the fourth parameter to
- CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((3333ddddmmmm)))).... _t_y_p_e is the particular type of callback. It is
- passed so that a single function could be used for all eight callbacks.
- _d_a_t_a is the data returned for this _t_y_p_e of callback. The argument is
- cast to void*. Each type of callback returns a different kind of data.
- An explanation of the callback types and data structures passed to them
- is given below. See _c_d_f_r_a_m_e(4) for a detailed description of each type
- of data in the digital audio data stream.
-
- ccccdddd____aaaauuuuddddiiiioooo
- This is the audio data. The _d_a_t_a argument in this case is really a
- sssshhhhoooorrrrtttt**** pointing at an array containing the byte-swapped and, if
- necessary, de-emphasized audio data ready to hand to AAAALLLLwwwwrrrriiiitttteeeessssaaaammmmppppssss((((3333ddddmmmm))))....
- If you use this callback you will want to change the handling of floating
- point underflow exceptions to achieve acceptable performance. Put the
- following lines of code in your program:
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((3333ddddmmmm)))) CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((3333ddddmmmm))))
-
-
-
- #include <sigfpe.h>
-
- sigfpe_[_UNDERFL].repls = _ZERO;
- handle_sigfpes(_ON, _EN_UNDERFL, NULL, _ABORT_ON_ERROR, NULL);
-
-
- See _C_D_i_n_t_r_o(_3_d_m) for a complete explanation.
-
- ccccdddd____ppppnnnnuuuummmm
- This is the number of the current program (aka track). The data type in
- this case is a pointer to a ssssttttrrrruuuucccctttt ccccddddpppprrrrooooggggnnnnuuuummmm defined in _c_d_a_u_d_i_o._h as
- follows:
-
- typedef struct cdprognum {
- int value; /* Program converted to integer */
- struct cdpackedbcd bcd; /* Program in BCD digits */
- } CDPROGNUM;
-
-
- Program number AA (program number not currently valid) is represented in
- the converted _v_a_l_u_e by 0xaaa. Program number BB (lead-in) is represented
- by 0xbbb and program number EE (lead-out) is represented by 0xeee.
-
- ccccdddd____iiiinnnnddddeeeexxxx
- This is the index number of the current subdivision within the program.
- The data type in this case is a pointer to a ssssttttrrrruuuucccctttt ccccddddpppprrrrooooggggnnnnuuuummmm as
- described above.
-
- ccccdddd____ppppttttiiiimmmmeeee
- This is the time into the current program. The data type is a pointer to
- a ssssttttrrrruuuucccctttt ccccddddttttiiiimmmmeeeeccccooooddddeeee defined in _c_d_a_u_d_i_o._h as follows:
-
- struct cdtimecode {
- unchar mhi:4, mlo:4;
- unchar shi:4, slo:4;
- unchar fhi:4, flo:4;
- } ptime;
-
-
- ccccdddd____aaaattttiiiimmmmeeee
- This is the time since the start of the disc (absolute time). The data
- type is a pointer to a ssssttttrrrruuuucccctttt ccccddddttttiiiimmmmeeeeccccooooddddeeee as described above.
-
- ccccdddd____ccccaaaattttaaaalllloooogggg
- This is the catalog number of the CD. The data type is a cccchhhhaaaarrrr**** pointing
- to an array of 13 bytes. Each byte contains 1 BCD digit in its least
- significant nibble.
-
- ccccdddd____iiiiddddeeeennnntttt
- This is the ISRC identification number of the recording. The data type
- is a pointer to a ssssttttrrrruuuucccctttt ccccddddiiiiddddeeeennnntttt defined in _c_d_a_u_d_i_o._h as follows:
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((3333ddddmmmm)))) CCCCDDDDaaaaddddddddccccaaaallllllllbbbbaaaacccckkkk((((3333ddddmmmm))))
-
-
-
- struct cdident {
- unchar country[2];
- unchar owner[3];
- unchar year[2];
- unchar serial[5];
- } ident;
-
-
- _c_o_u_n_t_r_y and _o_w_n_e_r are encoded in the six-bit code converted by
- CCCCDDDDssssbbbbttttooooaaaa((((3333ddddmmmm)))).... _y_e_a_r and _s_e_r_i_a_l _a_r_e _B_C_D _d_i_g_i_t_s.
-
- ccccdddd____ccccoooonnnnttttrrrroooollll
- This is for the control bits from the CD subcode data. The data type is
- uuuunnnncccchhhhaaaarrrr**** pointing at a single byte. The bits in this byte include copy
- protect and preemphasis on or off.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- Cdintro(3dm), CDseekblock(3dm), CDseektrack(3dm), CDclose(3dm),
- CDcreateparser(3dm), CDopen(3dm), CDparseframe(3dm), CDreadda(3dm),
- CDseek(3dm), CDremovecallback(3dm), CDresetparser(3dm), cdframe(4),
- sigfpe(3C)
-
- AAAAUUUUTTTTHHHHOOOORRRR
- Roger Chickering, Mark Callow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-